package org.example;

import java.io.*;

public class IO_Demo12 {
    public static void main(String[] args) throws IOException {
        //缓冲流
        //字节缓冲流
        BufferedInputStream bis=new BufferedInputStream(new FileInputStream("目标文件路径"));
        BufferedOutputStream bos=new BufferedOutputStream(new FileOutputStream("目标文件路径"));

       int c;
       byte[] b=new byte[1024];
       while((c=bis.read(b))!=-1){
           bos.write(b,0,c);
       }
       //关闭
       bis.close();
       bos.close();
    }
}
